package com.yxjx.duoxue.datamodel.course;

import java.io.Serializable;
import java.util.ArrayList;

import com.yxjx.duoxue.course.datamodel.AdDTS;
import com.yxjx.duoxue.datamodel.DMAuth;
import com.yxjx.duoxue.datamodel.DMCommentLevelAvg;
import com.yxjx.duoxue.datamodel.DMProduct;
import com.yxjx.duoxue.datamodel.DMTeacher;
import com.yxjx.duoxue.datamodel.school.DMSchool;

public class DMCourse implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2344817681831702849L;
	
	private long mCourseId;
	private String mCourseName;
	// first level category
	private String mCourseType1;
	// second level category
	private String mCourseType2;
	
	private long mSchoolId;
	private String mSchoolFullName;
	
	private String mCourseKeyWords;
	private String mCourseDescription;
	private String mCourseAchievement;
	// two integer to record the prop age duration.
	private int mPropAgeStart;
	private int mPropAgeEnd;
	private int mCourseStatus;
	private long mOperatorUserId;
	private String mLastOperatorTimeStamp;
	private int mCreateTime;
	// course icon and image.
	private String headImageUrl;
	private String schoolGps;
	private ArrayList<DMTeacher> mTeachers = new ArrayList<DMTeacher>();
	
	private int mShowPerPrice = -1;
	private int mShowPackagePrice = -1;
	private int mPerPrice;
	private int mPackagePrice;
	private int visitCount;
	private ArrayList<DMAuth> authArray = new ArrayList<DMAuth>();
	// 是否可以免费预约:
	private int mSupportBook;
	// 学校地址
	private String mAddress;
	// 报名号码
	private String mSchoolPhone;
	// 是否已被收藏
	private int favStatus;
	
	private DMCommentLevelAvg mSchoolCommentLevel;
	private DMCommentLevelAvg mCourseCommentLevel;
	
	// 所属的School
	private DMSchool mSchool;
	
	// 商品列表
	private ArrayList<DMProduct> mProducts;
	// 新增课程详情 （7维度）
    private CourseDetailDTS courseDetail = new CourseDetailDTS();
    // 置顶的轮播图
    private String imageTurn = "";
    // 课程详情的广告。
    private AdDTS adItem = null;
    // 折扣信息
    private String discount = "";
	
	public long getCourseId() {
		return mCourseId;
	}
	public void setCourseId(long mCourseId) {
		this.mCourseId = mCourseId;
	}
	
	public String getCourseName() {
		return mCourseName;
	}
	public void setCourseName(String mCourseName) {
		this.mCourseName = mCourseName;
	}
	public String getCourseType1() {
		return mCourseType1;
	}
	public void setCourseType1(String mCourseType1) {
		this.mCourseType1 = mCourseType1;
	}
	public String getCourseType2() {
		return mCourseType2;
	}
	public void setCourseType2(String mCourseType2) {
		this.mCourseType2 = mCourseType2;
	}
	public long getSchoolId() {
		return mSchoolId;
	}
	public void setSchoolId(long mSchoolId) {
		this.mSchoolId = mSchoolId;
	}
	public String getCourseKeyWords() {
		return mCourseKeyWords;
	}
	public void setCourseKeyWords(String mCourseKeyWords) {
		this.mCourseKeyWords = mCourseKeyWords;
	}
	public String getCourseDescription() {
		return mCourseDescription;
	}
	public void setCourseDescription(String mCourseDescription) {
		this.mCourseDescription = mCourseDescription;
	}
	public int getPropAgeStart() {
		return mPropAgeStart;
	}
	public void setPropAgeStart(int mPropAgeStart) {
		this.mPropAgeStart = mPropAgeStart;
	}
	public int getPropAgeEnd() {
		return mPropAgeEnd;
	}
	public void setPropAgeEnd(int mPropAgeEnd) {
		this.mPropAgeEnd = mPropAgeEnd;
	}
	public int getCourseStatus() {
		return mCourseStatus;
	}
	public void setCourseStatus(int mCourseStatus) {
		this.mCourseStatus = mCourseStatus;
	}
	public long getOperatorUserId() {
		return mOperatorUserId;
	}
	public void setOperatorUserId(long mOperatorUserId) {
		this.mOperatorUserId = mOperatorUserId;
	}
	public String getLastOperatorTimeStamp() {
		return mLastOperatorTimeStamp;
	}
	public void setLastOperatorTimeStamp(String lastOperatorTimeStamp) {
		this.mLastOperatorTimeStamp = lastOperatorTimeStamp;
	}
	public int getCreateTime() {
		return mCreateTime;
	}
	public void setCreateTime(int mCreateTime) {
		this.mCreateTime = mCreateTime;
	}
	public String getSchoolFullName() {
		return mSchoolFullName;
	}
	public void setSchoolFullName(String schoolFullName) {
		this.mSchoolFullName = schoolFullName;
	}
	public String getHeadImageUrl() {
		return headImageUrl;
	}
	public void setHeadImageUrl(String headImageUrl) {
		this.headImageUrl = headImageUrl;
	}
	public String getCourseAchievement() {
		return mCourseAchievement;
	}
	public void setCourseAchievement(String mCourseAchievement) {
		this.mCourseAchievement = mCourseAchievement;
	}
	public ArrayList<DMTeacher> getTeachers() {
		return mTeachers;
	}
	public void setTeachers(ArrayList<DMTeacher> mTeachers) {
		this.mTeachers = mTeachers;
	}
	public int getSupportBook() {
		return mSupportBook;
	}
	public void setSupportBook(int mSupportBook) {
		this.mSupportBook = mSupportBook;
	}
	public String getAddress() {
		return mAddress;
	}
	public void setAddress(String mAddress) {
		this.mAddress = mAddress;
	}
	public String getSchoolPhone() {
		return mSchoolPhone;
	}
	public void setSchoolPhone(String mSchoolPhone) {
		this.mSchoolPhone = mSchoolPhone;
	}
	public int getShowPerPrice() {
		return mShowPerPrice;
	}
	public void setShowPerPrice(int mShowPerPrice) {
		this.mShowPerPrice = mShowPerPrice;
	}
	public int getShowPackagePrice() {
		return mShowPackagePrice;
	}
	public void setShowPackagePrice(int mShowPackagePrice) {
		this.mShowPackagePrice = mShowPackagePrice;
	}
	public int getPerPrice() {
		return mPerPrice;
	}
	public void setPerPrice(int mPerPrice) {
		this.mPerPrice = mPerPrice;
	}
	public int getPackagePrice() {
		return mPackagePrice;
	}
	public void setPackagePrice(int mPackagePrice) {
		this.mPackagePrice = mPackagePrice;
	}
	
	/**
	 * 用于信息展示时显示年龄信息
	 * @return
	 */
	public String getAgeDesc() {
		String ret = "适合学生：";
		if (getPropAgeStart() == 0 && getPropAgeEnd() == 100) {
			ret = "年龄不限";
		} else if (getPropAgeStart() == 0) {
			ret = ret + getPropAgeEnd() + "岁以下";
		} else if (getPropAgeEnd() == 100) {
			ret = ret + getPropAgeStart() + "岁以上";
		} else {
			ret = ret + getPropAgeStart() + "~" + getPropAgeEnd() + "岁"; 
		}
		return ret;
	}
	public String getSchoolGps() {
		return schoolGps;
	}
	public void setSchoolGps(String schoolGps) {
		this.schoolGps = schoolGps;
	}
	public DMCommentLevelAvg getSchoolCommentLevel() {
		return mSchoolCommentLevel;
	}
	public void setSchoolCommentLevel(DMCommentLevelAvg schoolCommentLevel) {
		this.mSchoolCommentLevel = schoolCommentLevel;
	}
	public DMCommentLevelAvg getCourseCommentLevel() {
		return mCourseCommentLevel;
	}
	public void setCourseCommentLevel(DMCommentLevelAvg courseCommentLevel) {
		this.mCourseCommentLevel = courseCommentLevel;
	}
	public int getFavStatus() {
		return favStatus;
	}
	public void setFavStatus(int favStatus) {
		this.favStatus = favStatus;
	}
	public DMSchool getSchool() {
		return mSchool;
	}
	public void setSchool(DMSchool mSchool) {
		this.mSchool = mSchool;
	}
	public int getVisitCount() {
		return visitCount;
	}
	public void setVisitCount(int visitCount) {
		this.visitCount = visitCount;
	}
	public ArrayList<DMAuth> getAuthArray() {
		return authArray;
	}
	public void setAuthArray(ArrayList<DMAuth> authArray) {
		this.authArray = authArray;
	}
	public ArrayList<DMProduct> getProducts() {
		return mProducts;
	}
	public void setProducts(ArrayList<DMProduct> mProducts) {
		this.mProducts = mProducts;
	}
	public CourseDetailDTS getCourseDetail() {
		return courseDetail;
	}
	public void setCourseDetail(CourseDetailDTS courseDetail) {
		this.courseDetail = courseDetail;
	}
	public String getImageTurn() {
		return imageTurn;
	}
	public void setImageTurn(String imageTurn) {
		this.imageTurn = imageTurn;
	}
	public AdDTS getAdItem() {
		return adItem;
	}
	public void setAdItem(AdDTS adItem) {
		this.adItem = adItem;
	}
	public String getDiscount() {
		return discount;
	}
	public void setDiscount(String discount) {
		this.discount = discount;
	}
}
